Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% CPU utilization even after request is served[ wasmedge_hyper_server] #11

Open
abhisheksharma1395 opened this issue Mar 14, 2023 · 3 comments

Comments

@abhisheksharma1395
Copy link

Hi,

I am trying to run the docker image of wasmedge_hyper_server in knative. And I observed that even after I got a successful response, the CPU utilization of the pod is 100% until the pod is brought down after some idle time. I tried to replicate the issue with rust only code (without wasm) which appears to be working fine.
I was not able to pinpoint the issue. Can anyone please give some input on the same.

image

Best Regards
Abhishek Sharma

@juntao
Copy link
Member

juntao commented Mar 14, 2023

Thank you. Can you tell us how you setup to run this in knative? Did you use runwasi or crun? Which version of runwasi / crun did you use? Thanks!

cc @dm4

@abhisheksharma1395
Copy link
Author

Hi,

I was running it with crun runtime, and the details are as follows

crun version 1.8.1.0.0.0.16-7be9e
commit: 7be9ec2d03e31df0090c062c5bf6ebd241a7cd3b
rundir: /run/user/20025/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +WASM:wasmedge +YAJL

And for additional info, my contained config is
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]

    [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.crun]
      base_runtime_spec = ""
      container_annotations = []
      pod_annotations = ["*.wasm.*", "wasm.*", "module.wasm.image/*", "*.module.wasm.image", "module.wasm.image/variant.*"]
      privileged_without_host_devices = false
      runtime_engine = ""
      runtime_root = ""
      runtime_type = "io.containerd.runc.v2"

      [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.crun.options]
        BinaryName = "crun"
        CriuImagePath = ""
        CriuPath = ""
        CriuWorkPath = ""
        IoGid = 0
        IoUid = 0
        NoNewKeyring = false
        NoPivotRoot = false
        Root = ""
        ShimCgroup = ""
        SystemdCgroup = true

Thanks!

@abhisheksharma1395
Copy link
Author

abhisheksharma1395 commented Mar 16, 2023

Hi,

I'd like to point out that with the same knative setup I tried to run https://github.com/second-state/wasmedge_wasi_socket examples, they are working fine (no 100% CPU utilization after the request is served ).

I prematurely suspect there might be some issue with hyper or tokio dependencies.

  1. Based on previous observation, with rust code (with and without wasm) we can rule out issues with main.rs.
  2. Based on this observation, we can rule out issues with environment (knative and runtime) setup.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants